﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:TheOliver_Controls="clr-namespace:TheOliver.Controls;assembly=TheOliver.Controls.Behaviors" x:Class="TheOliver.Controls.SampleApp.Samples.Behaviors.DeepZoomBehaviors"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <MultiScaleImage
            x:Name="_msi"
            Source="/SampleDeepZoom/dzc_output.xml" >
        	<i:Interaction.Triggers>
        		<i:EventTrigger EventName="ImageOpenSucceeded">
        			<TheOliver_Controls:DeepZoomRandomImageArrangeBehavior TargetObject="{Binding ElementName=_msi}"/>
        		</i:EventTrigger>
        	</i:Interaction.Triggers>
        	<i:Interaction.Behaviors>
        		<TheOliver_Controls:DeepZoomBehavior/>
        	</i:Interaction.Behaviors>
        </MultiScaleImage>
        <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Top">
        	<Button x:Name="_home" Content="Home">
        		<i:Interaction.Triggers>
        			<i:EventTrigger EventName="Click">
        				<TheOliver_Controls:DeepZoomNavigateHomeBehavior TargetObject="{Binding ElementName=_msi}"/>
        			</i:EventTrigger>
        		</i:Interaction.Triggers>
        	</Button>
        	<Button x:Name="_mix" Content="Mix">
        		<i:Interaction.Triggers>
        			<i:EventTrigger EventName="Click">
        				<TheOliver_Controls:DeepZoomRandomImageArrangeBehavior TargetObject="{Binding ElementName=_msi}"/>
        				<TheOliver_Controls:DeepZoomNavigateHomeBehavior TargetObject="{Binding ElementName=_msi}"/>
        			</i:EventTrigger>
        		</i:Interaction.Triggers>
        	</Button>
        	<Button x:Name="_slide" Content="Slideshow">
        		<i:Interaction.Triggers>
        			<i:EventTrigger EventName="Click">
        				<TheOliver_Controls:DeepZoomSlideShowBehavior TargetObject="{Binding ElementName=_msi}"/>
        			</i:EventTrigger>
        		</i:Interaction.Triggers>
        	</Button>
        </StackPanel>

    </Grid>
</UserControl>
